package com.pets.springboot_petshop.service;

import com.pets.springboot_petshop.entity.Admin;
import com.pets.springboot_petshop.entity.AdminDTO;
import org.apache.ibatis.annotations.Select;

import java.util.List;
/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/8 上午9:44 周二
 * @Description: 管理员
 */
public interface AdminService {
    Admin select(int id);
    //根据用户名查询用户
    Admin findByAdminName(String username);
    //根据用户邮箱查询用户
    Admin findByAdminemail(String email);
    //添加
    void addAdmin(String username, String password, String role,String email);
    //查询所有
    List<Admin> findAll();
    //修改管理员密码
    boolean updateAdminpassword(Admin admin);
    //修改管理员数据
    int updateAdminById(Admin admin);
    //删除
    int deleteAdminById(int id);

    AdminDTO convertToDTO(Admin admin);
    //根据用户名模糊查询用户
    List<Admin> selectusername(String username);
    //根据用户邮箱模糊查询用户
    List<Admin> selectemail(String email);
}
